A known liquid ejection device ejects liquid toward a recording medium from one or more nozzles. Such a liquid ejection device includes an inkjet printer that is configured to perform printing on a recording sheet by ejecting ink from an inkjet head that reciprocates in a scanning direction. Such an inkjet printer includes a plurality of ribs that are arranged side by side along the scanning direction and a plurality of corrugate plates, each of which being located between each pair of ribs of the plurality of ribs. In the inkjet printer, while a recording sheet is conveyed, the plurality of ribs support a recording sheet from below at a position upstream of the inkjet head in a conveyance direction and the plurality of corrugate plates press the recording sheet from above at the same position in conjunction with the plurality of ribs, resulting in formation of a predetermined corrugated shape in the recording sheet along the scanning direction. Under this condition, a gap between the recording sheet and the inkjet head varies along the scanning direction. Therefore, the inkjet printer obtains gap variation information relating to variation in the gap therebetween along the scanning direction prior to performance of printing, and controls timings of ejecting ink to be landed on the recording sheet, from the nozzles, based on the gap variation information.